package com.yinda.dt.produce.module.order;

import org.json.JSONArray;

import io.dcloud.common.DHInterface.AbsMgr;
import io.dcloud.common.DHInterface.IFeature;
import io.dcloud.common.DHInterface.IWebview;
import io.dcloud.common.DHInterface.StandardFeature;
import io.dcloud.common.util.JSUtil;

/**
 * Created by ChenXuanHe on 2017/5/26.
 */

public class CloseWindowPlugin extends StandardFeature {

    public void closeWindowPluginFunction(IWebview iWebview, JSONArray array) {
        JSONArray newArray = new JSONArray();
        String callBackID = array.optString(0);
        JSUtil.execCallback(iWebview, callBackID, newArray, JSUtil.OK, false);
        iWebview.getActivity().finish();
    }
}
